package Netzwerkprogrammierung.g3.RMI;

import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.RemoteException;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;

public class RMIClient {

	/**
	 * @param args
	 * @throws RemoteException 
	 * @throws NotBoundException 
	 * @throws MalformedURLException 
	 */
	public static void main(String[] args) throws RemoteException, MalformedURLException, NotBoundException {
		
		Registry registry = LocateRegistry.getRegistry();
		RMIRemoteInterface multiplyerLocal = 
				(RMIRemoteInterface)registry.lookup("Multiplyer");
		
		RMIRemoteInterface multiplyer = 
				(RMIRemoteInterface)Naming.lookup("//127.0.0.1/Multiplyer");
		
		System.out.println("3*2="+multiplyer.multiply(3, 2));
		

	}

}
